import { NavLink } from 'react-router-dom';
import './nav.scss';
export class Nav extends React.Component {
    constructor(props) {
        super(props)
    }
    render() {
        let domList = this.props.navList.map(({ pathname, text }, index) => (
            <li key={index}>
                <NavLink activeClassName="active" to={pathname} >{text}</NavLink>
            </li>
        ));
        return (
            <nav>
                <div className="nav">
                    <ul className="cl">
                        {domList}
                    </ul>
                </div>
            </nav>
        )
    }
}